import yagmail,logging

def log_set():
    logging.basicConfig(filename='./log/xiachufang.log',filemode='w+',level=logging.DEBUG,format='%(asctime)s -> %(levelname)s -> %(message)s')

def send_mail(filepath):
    mail = yagmail.SMTP(user='1508523002@qq.com',password='bgbsnkdrydkgbagf',host='smtp.qq.com')
    send_mail = mail.send(to='1508523002@qq.com',subject='下厨房',contents='下厨房',attachments=filepath)

import yaml
def get_data_yaml(filepath):
    with open(filepath,'r',encoding='utf-8')as f:
        return yaml.safe_load(f)